package org.dromara.wmscloud.domain.bo;

import org.dromara.wmscloud.domain.BaseUnit;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 物料单位业务对象 base_unit
 *
 * @author hou
 * @date 2025-04-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BaseUnit.class, reverseConvertGenerate = false)
public class BaseUnitBo extends BaseEntity {
    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long unitId;

    /**
     * 物料单位编码
     */
    @NotBlank(message = "物料单位编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unitCode;

    /**
     * 物料单位名称
     */
    @NotBlank(message = "物料单位名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unitName;

    /**
     * 是否是主单位
     */
    @NotBlank(message = "是否是主单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String primaryFlag;

    /**
     * 主单位ID
     */
    private Long primaryUnitId;

    /**
     * 与主单位换算比例
     */
    private Long changeRate;

    /**
     * 单位状态
     */
    @NotNull(message = "单位状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    private String remark;


}
